<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			window.onload = function(){
				var name = "The Window"
				var object = {
					name: "My Object",
					getNameFunc: function(){
						return function(){
							return this.name
						}
					}
				}
				alert(object.getNameFunc()())  // The window
				
				var name2 = "The Window"
				var object2 = {
					name2: "My Object",
					getNameFunc2: function(){
						var that = this
						return function(){
							return that.name2
						}
					}
				}
				alert(object.getNameFunc()())  // My Object
			}
		</script>
	</head>
	<body>
	</body>
</html>
